#ifndef CONCURREN_QUEUE_H_
#define CONCURREN_QUEUE_H_

#include <stdbool.h>

#include "public_share.h"

struct conQueue {
    struct nodeStr *head;
    struct nodeStr *tail;
    pthread_spinlock_t headLock;
    pthread_spinlock_t tailLock;
};

bool cqInitQueue(struct conQueue *queue);

bool cqDestroyQueue(struct conQueue *queue);

bool cqEnqueue(struct conQueue *queue, ELEMENT_TYPE val);

bool cqDequeue(struct conQueue *queue, ELEMENT_TYPE *val);

#endif